/*
 * Author : Priyanka & Lin
 * Inspiration : More Unit 
 */
package sg.edu.nus.iss.cerberus.extensionpoint;

import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IMethod;

import sg.edu.nus.iss.cerberus.preferences.Preferences;


public interface IAddTestMethodContext
{
    /**
     * Returns the test class, that is the class under test.
     * 
     * @return Test class.
     */
    ICompilationUnit getTestClass();

    /**
     * Returns the test method, that is the method implementing the test case.
     * 
     * @return Test method.
     */
    IMethod getTestMethod();

    /**
     * Return the class under test.
     * 
     * @return Class under test.
     */
    ICompilationUnit getClassUnderTest();

    /**
     * Returns the method under test.
     * 
     * @return Method under test.
     */
    IMethod getMethodUnderTest();

    /**
     * Sets the test method.
     * <p>
     * Updates the context, after the test method has been replaced from an
     * extension.
     * 
     * @param testMethod Testmethod.
     */
    void setTestMethod(IMethod testMethod);

    /**
     * Is a new test class created?
     * 
     * @return New test class?
     */
      boolean isNewTestClassCreated();

    /**
     * Returns the value of the  Preferences, see {@link Preferences},
     * {@link PreferenceConstants}.
     * <p>
     * It is not permitted, that clients modify the preferences as this can lead
     * to unpredictable results.
     * 
     * @return Preferences.
     */
    Preferences getPreferences();

    /**
     * Sets the value of the  preferences, see {@link Preferences},
     * {@link PreferenceConstants}.
     * 
     * @param preferences Preferences.
     */
    void setPreferences(Preferences preferences);
}
